package com.dbs.test.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;

//@Service
public class ZuulTestHystrixService {

	/*@Autowired
	private RestTemplate restTemplate;

	@HystrixCommand(fallbackMethod = "addServiceFallback")
	public Integer add(Integer a, Integer b) {
		return restTemplate.getForEntity("http://COMPUTER-SERVICE/add?a=" + a + "&b=" + b, Integer.class).getBody();
	}

	// 回滚的参数要和不会滚的那个对应,返回值也得对应，不然都报错
	public Integer addServiceFallback(Integer a, Integer b) {
		return 404;
	}*/
}
